home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ADA Programming Guide
/
ADA Programming Guide.iso
/
adatutor
/
lrmrdr
/
view_daf.a
< prev
Wrap
Text File
|
1996-01-30
|
2KB
|
45 lines
-- View_DAF by Richard Conn
-- View_DAF is used to view the contents of a DAF (Direct Access File).
-- View_DAF is a part of the Ada LRM Reader.
-- ***********************************************************************
-- ON-LINE Ada LANGUAGE REFERENCE MANUAL by Richard Conn
--
-- COPYRIGHT NOTICE
-- Ada LRM Reader - Interactive Presentation of the Ada LRM
-- Copyright (C) 1992 Richard Conn
--
-- This program is free software; you can redistribute it
-- and/or modify it under the terms of the GNU General Public
-- License Version 1 as published by the Free Software
-- Foundation.
--
-- This program is distributed in the hope that it will be
-- useful, but WITHOUT ANY WARRANTY; without even the implied
-- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-- PURPOSE. See the GNU General Public License for more
-- details. You should have received a copy of the GNU General
-- Public License along with this program; if not, write to the
-- Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA
-- 02139, USA. See the ABOUT screens for further information,
-- including information on how to contact the author.
with DAF_Handler;
with CLI; -- CS Parts
with Console; -- CS Parts
procedure View_DAF is
Line : DAF_Handler.LINE;
Input_File : DAF_Handler.DAF_ID;
begin -- View_DAF
if CLI.ARGC = 1 then
Console.Put_Line ("Syntax: View_DAF Filename");
else
Input_File := DAF_Handler.Open (CLI.ARGV(1));
while not DAF_Handler.Is_End_of_File (Input_File) loop
Line := DAF_Handler.Read_Next (Input_File);
Console.Put_Line (Line.Str(1..Line.Str_Last));
end loop;
DAF_Handler.Close (Input_File);
end if;
end View_DAF;